From: Joey Hess Date: Tue, 25 Feb 2025 22:44:40 +0000 (-0400) Subject: add compute remote uuid to compute state url X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~6^2~119^2~35 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=e702cb94fffbdcd023f95ce0255ebf2f37c89dc4;p=git-annex.git add compute remote uuid to compute state url Otherwise, two different compute remotes that happen to take the same input would use the same compute state url. Which seems wrong. --- diff --git a/Command/AddComputed.hs b/Command/AddComputed.hs index 0d614a1fc0..7afd23a129 100644 --- a/Command/AddComputed.hs +++ b/Command/AddComputed.hs @@ -147,7 +147,7 @@ perform o r program = do | otherwise = ingestwith $ ingestAdd' nullMeterUpdate (Just ld) (Just stateurlk) where - stateurl = Remote.Compute.computeStateUrl state outputfile + stateurl = Remote.Compute.computeStateUrl r state outputfile stateurlk = fromUrl stateurl Nothing True outputfile' = tmpdir outputfile ld = LockedDown ldc $ KeySource diff --git a/Remote/Compute.hs b/Remote/Compute.hs index 1157ac581d..b6ba1dbf2e 100644 --- a/Remote/Compute.hs +++ b/Remote/Compute.hs @@ -257,9 +257,9 @@ parseComputeState k b = in go c' rest {- A compute: url for a given output file of a computation. -} -computeStateUrl :: ComputeState -> OsPath -> URLString -computeStateUrl st p = - "annex-compute:" ++ fromOsPath p ++ "?" +computeStateUrl :: Remote -> ComputeState -> OsPath -> URLString +computeStateUrl r st p = + "annex-compute:" ++ fromUUID (uuid r) ++ "/" ++ fromOsPath p ++ "?" ++ decodeBS (formatComputeState' Nothing st') where -- Omit computeOutputs, so this gives the same result whether